#include "stdafx.h"
#include "InitConfig.h"

bool state = true;
bool jnState = false;
map<CString, int> mapKey;
int nI = 1;

void BuLan(CString key) {
	long x, y;
	g_dm->FindPic(0, 0, 900, 1200, L"xue.bmp", L"050505", 0.90, 0, &x, &y);
	if (x == -1) {
		g_dm->KeyDown(mapKey[key]);
		RandomNumber(110, 180);
		g_dm->KeyUp(mapKey[key]);
	}
}

void buxue(CString key) {
	long x, y;
	g_dm->FindPic(0, 0, 900, 1200, L"xue.bmp", L"050505", 0.90, 0, &x, &y);
	if (x == -1) {
		g_dm->KeyDown(mapKey[key]);
		RandomNumber(110, 180);
		g_dm->KeyUp(mapKey[key]);
	}
}

void JumpDown() {
	g_dm->KeyDown(40);
	Sleep(RandomNumber(200, 300));
	g_dm->KeyDown(18);
	Sleep(RandomNumber(80, 120));

	g_dm->KeyUp(18);
	Sleep(RandomNumber(60, 90));
	g_dm->KeyUp(40);
	Sleep(RandomNumber(60, 90));
}